package com.yun.blog.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yun.blog.bean.Category;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * title        : CategoryMapper
 * projectName  : dantouBlog-back
 * description  : 博客分类Mapper
 * author       : simple
 * date         : 2022/11/23下午9:20
 */


@Mapper
public interface CategoryMapper extends BaseMapper<Category> {

    String getCategoryNameByCategoryId(@Param("categoryId") Integer categoryId);

    Category getByCategoryName(@Param("categoryName") String categoryName);

    Category getByCategoryId(@Param("categoryId") Integer categoryId);

    List<Category> getByIsUse(@Param("isUse") Boolean isUse);

    <P extends IPage<Category>> P customPage(P page, String searchText);
}
